<template>
  <div>
    <!--头部-->
    <dx-header></dx-header>
    <!--banner-->
    <dx-banner></dx-banner>
    <!--详情-->
    <dx-detail></dx-detail>
    <!--服务-->
    <dx-service :List="serviceList"></dx-service>
    <!--尾部-->
    <dx-footer></dx-footer>
  </div>
</template>
<script>
  import DxHeader from 'common/header/header'
  import DxFooter from 'common/footer/footer'
  import DxBanner from '../intro/component/banner'
  import DxDetail from '../intro/component/detail.vue'
  import DxService from '../intro/component/service'
  export default {
    name: 'Intro',
    components: {
      DxHeader,
      DxFooter,
      DxService,
      DxBanner,
      DxDetail
    },
    data () {
      return {
        serviceList: []
      }
    },
    methods: {
      // 获取热门专业
      getPopularList () {
        this.$axios.get('/website/home/getServiceConver')
          .then((res) => {
            res = res.data
            if (res.code === 200) {
              this.serviceList = res.data
            }
          })
      }
    },
    activated () {
      this.getPopularList()
    }
  }
</script>
